package cz.muni.fi.pa165.sme.api.to;

import org.joda.time.DateTime;

/**
 * @author jirankova
 */
public class SportActivityRecordTO {
	private Long id;
	private SportActivityTO sportActivity;
	private UserTO user;
	private DateTime activityStart;
	private DateTime activityStop;
	private Float distance;
	private Float duration;

	public Long getId() {
		return id;
	}

	public void setId(final Long id) {
		this.id = id;
	}

	public SportActivityTO getSportActivity() {
		return sportActivity;
	}

	public void setSportActivity(final SportActivityTO sportActivity) {
		this.sportActivity = sportActivity;
	}

	public UserTO getUser() {
		return user;
	}

	public void setUser(final UserTO user) {
		this.user = user;
	}

	public DateTime getActivityStart() {
		return activityStart;
	}

	public void setActivityStart(final DateTime activityStart) {
		this.activityStart = activityStart;
	}

	public DateTime getActivityStop() {
		return activityStop;
	}

	public void setActivityStop(final DateTime activityStop) {
		this.activityStop = activityStop;
	}

	public Float getDistance() {
		return distance;
	}

	public void setDistance(final Float distance) {
		this.distance = distance;
	}

	public Float getDuration() {
		return duration;
	}

	public void setDuration(final Float duration) {
		this.duration = duration;
	}

	@Override
	public boolean equals(final Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;

		final SportActivityRecordTO that = (SportActivityRecordTO) o;

		return !(id == null || (!id.equals(that.id)));
	}

	@Override
	public int hashCode() {
		return id != null ? id.hashCode() : 0;
	}

	@Override
	public String toString() {
		return "SportActivityRecordTO{" +
				"id=" + id +
				", sportActivity=" + sportActivity +
				", user=" + user +
				", activityStart=" + activityStart +
				", activityStop=" + activityStop +
				", distance=" + distance +
				", duration=" + duration +
				'}';
	}
}
